<extend name="Public:goodsHeader"/>
<block name="content">
<!--商品-->
<div class="return">
	<span class="public">
		<a  href="###" class="hover">商品</a>
		<a  href="{:U('Goods/goods_detail')}?id={$resone.id}">详情</a>
		<a  href="{:U('Goods/goods_evaluate')}?id={$resone.id}">评价</a>
	</span>
</div>
<div class="commodity1">
  <if condition="$pic neq '' ">
	  <div class="slide mySide" id="myCarousel">
	  	<div id="home_slider" class="carousel-inner">
		  	<ul class="slides">
			  	<volist name="pic" id="vv">
			  		<li><div class="slide"><img src="{$vv}" style="width:100%;"></div></li>
			  	</volist>
			</ul>
		</div>
	 </div>
  <else/>
  		<img src="{$resone.pic_url}" >
  </if>
  <p  class="size18 ">{$resone.title}</p>
  <p ><span class="Orange size18">￥</span><span class="Orange size28" id="taocan_price">{$resone.price_new}</span><span class="Orange size18"> 元</span> &nbsp;&nbsp;&nbsp; <del class="gray">￥{$resone.price_old} 元</del><br/>
	<a href="tel://021-52218886">
		<img style="height:30px; width:30px; " src="__PUBLIC__/Mobile/images/TEL3.png"> [ 021-52218886 ]  客服时间:[ 9:30 - 18:00 ]
	</a>
</p>
  </div>
<div class="Evaluation">
<span>送积分（ {$resone.fanli_jifen} 积分）</span> <if condition="empty($result_sc)"><button type="button" onClick="shoucang({$resone.id});">收藏此商品</button><else/><button type="button">已收藏</button></if>
</div>

<div class="Evaluation">
	<h3>套餐选择：<if condition="empty($taocan)">无</if></h3>
	<div class="clear"></div>	
	<foreach name="taocan" item="vo" key="i">
	<span>
		<span class="taocan_span" id="taocan_span{$i}" onclick="select_taocan({$i});">{$vo.guige_title}</span>
		<input id="guige_title{$i}" type="hidden" value="{$vo.guige_title}">
		<input id="guige_price_new{$i}" type="hidden" value="{$vo.guige_price_new}">
		<input id="guige_zhongliang{$i}" type="hidden" value="{$vo.guige_zhongliang}">
	</span>
    </foreach>
</div>
</script>
	<form method="post" action="{:U('Goods/goods_count')}">
	  <input type="hidden" name="goods_title[]" id="goods_title" value="{$resone.title}">
	  <input type="hidden" name="goods_id" id="goods_id" value="{$resone.id}">
	  <input type="hidden" name="pic_url[]" id="goods_pic" value="{$resone.pic_url}">
	  <input type="hidden" name="price_new[]" id="price_new" value="{$resone.price_new}">
	  <input type="hidden" name="type" id="type" value="0">
	  <input type="hidden" name="goods_num[]" id="buy_nub1" value="1">
	  <input type="hidden" name="price_sum" id="price_sum" value="{$resone.price_new}" >
	  <input type="hidden" name="now_buy" value="1"/>
	  <input type="hidden" name="taocan_name" id="taocan_name" value="无"/>
	  <input type="hidden" name="fanli_jifen" id="fanli_jifen" value="{$resone.fanli_jifen}" />
	  <input type="hidden" name="goods_id" id="goods_id" value="{$resone.id}" />
	  <div style="height:50px;"></div>
<div class="Navigation">
	<input type="button" class="Pay size18" onClick="return_home({$resone.id})" value="首页">

	<input type="button" class="Pay size18"   onClick="gouwuche()" value="购物车">

	<if condition="$res_member['grade_name'] == '合伙人' || $res_member['grade_name']=='会员'">
		<if condition="$resone.xiangou == 1">
			<input type="button" class="Pay size18"  value="限购商品">
		<else/>
		  <switch name="resone['shangjia']" >
		  <case value="1">
		    	<input type="button" class="Pay size18"   onClick="add_cart({$resone.id})" value="加入购物车">
		  </case>
		  <default />
		
		  <input type="button" class="Pay size18"  value="此商品已下架">
		
		  </switch>
		</if>
		<if condition="$xiangou_yigoumai == 1 && $resone.xiangou == 1">
	    	<input type="button" class="Pay size18"  value="已选购" >
		<else/>
		 	<switch name="resone['shangjia']" >
		  		<case value="1">
					<input type="submit" class="Pay size18"  value="立即购买">
		  		</case>
		 		<default />
	  		</switch>
		</if>
 	<else/>
  		<input type="submit" class="Pay size18"  value="立即购买">
  	</if>
</div>
</form>
<script type="text/javascript">
var SPX = "{:U('Goods/add_footprint')}";
var JC  = "{:U('Goods/add_cart')}";
function return_home(){
	window.location.href="{:U('Index/index')}";
}
function shoucang(id){
	window.location.href="{:U('Index/shoucang')}?goods_id="+id+"&pic_url={$resone.pic_url}&price_old={$resone.price_old}&detail_title={$resone.title}&price_new={$resone.price_new}";
}
function gouwuche(){
	window.location.href="{:U('Goods/goods_cart')}";
}
</script>
<script src="__PUBLIC__/Mobile/js/goods/goods.js"></script>
</block>